Streaming Properties

This feature is extremely useful when you need to generate large amounts of data but you can't afford to have it all stored in memory at one time during execution because it would break your application. Referencing a streaming property is as easy as referencing any other property and can be done so, like so:

${dtf.stream([random|repeat|etc],[size],[additional arguments separated by commas])}

Internally these properties are not resolved into the data that they represent but instead into an InputStream that can be read and immediately sent to whatever OutputStream is awaiting data. To the test writer they're used the same way any other property would be used but they allow the test writer to generate hundreds of streams sending GB objects at the same time while never hold more than a few MB (total) in memory. The main difference when using these properties is in the way the property is handled within the tag code where the developer can pick up an InputStream to read the data in a way more efficient manner than being give a huge chunk of data in a String.

The Streaming properties are broken down into the following 2 types:

Unstructured Stream Properties

There are a few unstructured stream types types already built into DTF which allow you to generate random and repeated data patterns, these include:

Structured Stream Properties

There are also structured data streaming types which generate data that are structured documents such as XML or JSON. The currently available structured stream types are:

Using DTF Streams in your Code

Now to take advantage of streaming properties as the developer of a tag you need to use a slightly different method when retrieving property data. This means that instead of using replaceProperties() function you will have to use the replacePropertiesAsInputStream() which if the underlying property is a DTF streaming property it will return an InputStream that you can use to get your data without having to house it all in memory.